//
//  BLDebugViewController.swift
//  BLLiveTelecast
//
//  Created by BigL055 on 16/6/21.
//  Copyright © 2016年 bigL.liveTelecast.com. All rights reserved.
//

import UIKit

class BLDebugViewController: UITableViewController {
    
    
    @IBOutlet weak var isAllowVideoPlay: UISwitch!
    @IBOutlet weak var isAllowDanmuPlay: UISwitch!
    @IBOutlet weak var isAllowShare: UISwitch!
    
    let userDefault = NSUserDefaults()
    let isAllowVideoPlayKey = "isAllowVideoPlayKey"
    let isAllowDanmuPlayKey = "isAllowDanmuPlayKey"
    let isAllowShareKey = "isAllowShareKey"
    
    
    override func viewDidLoad() {
        isAllowVideoPlay.on = userDefault.boolForKey(isAllowVideoPlayKey)
        isAllowDanmuPlay.on = userDefault.boolForKey(isAllowDanmuPlayKey)
        isAllowShare.on = userDefault.boolForKey(isAllowShareKey)
    }
    
    
    
    /// 视频加载
    @IBAction func isAllowVideoPlay(sender: UISwitch) {
        
        Debug_isAllowVideoPlay = sender.on
        userDefault.setBool(sender.on, forKey: isAllowVideoPlayKey)
    }
    
    /// 弹幕加载
    @IBAction func isAllowDanmuPlay(sender: UISwitch) {
        Debug_isAllowDanmuPlay = sender.on
        userDefault.setBool(sender.on, forKey: isAllowDanmuPlayKey)
        
    }
    
    /// 分享功能
    @IBAction func isAllowShare(sender: UISwitch) {
        Debug_isAllowShare = sender.on
        userDefault.setBool(sender.on, forKey: isAllowShareKey)
    }
    
}
